<%@ page language="java" pageEncoding="utf-8"%>
<%@include file="/commons/taglib.jsp"%>

<html>
<head>
	<script type="text/javascript" src="${rootPath}/js/jquery.js"></script>
	<script type="text/javascript">
		
		function submitForm(){
			var form = document.getElementById( "teamForm" );
			form.action="${rootPath}/team_list.action";
			form.submit();
		}
		
		//保存球员数据
		function savePlayer( currentFootballTeamId ){
			var form = document.getElementById( "teamForm" );
			form.action="${rootPath}/team_savePlayer.action?currentFootballTeamId="+currentFootballTeamId;
			form.submit();
		}
		
		function saveTeamAllPlayer(){
			var form = document.getElementById( "teamForm" );
			form.action="${rootPath}/team_saveTeamAllPlayer.action";
			form.submit();
		}
		
	</script>
	
	<style type="text/css">		
		.tip{
			color:#ff0000;
			font-size:30px;
		}
	</style>
	
</head>
<body>
	<center>
		<form action="${rootPath}/liansai_list.action" method="post" name="teamForm" id="teamForm" >
			足球赛事年份：
			<select name="lianSaiYearId" id="lianSaiYearId" onchange="submitForm()">
				<c:forEach items="${lianSaiYearList}" var="lianSaiYear">
					<option value="${lianSaiYear.id}" <c:if test="${ lianSaiYearId == lianSaiYear.id }">selected</c:if> >
						${lianSaiYear.liansaiYear}
					</option>
				</c:forEach>
			</select><br/>
			
			足球联赛：
			<select name="lianSaiId" id="lianSaiId" onchange="submitForm()">
				<c:forEach items="${lianSaiList}" var="lianSai">
					<option value="${lianSai.id}" <c:if test="${ lianSaiId == lianSai.id }">selected</c:if> >
						${lianSai.chineseName}
					</option>
				</c:forEach>
			</select><br/>
			
			<table width="100%">				
				<tr>
					<th align="center" width="20%" >球队名称</th>
									
					<th align="center" width="10%" >总积分</th>
					<th align="center" width="10%" >主场积分</th>
					<th align="center" width="10%" >客场积分</th>
					
					<th align="center" width="10%" >总进球</th>
					<th align="center" width="10%" >主场进球</th>
					<th align="center" width="10%" >客场进球</th>
					
		 			<th align="center" width="20%" >操作</th>
				</tr>
				
				<c:forEach items="${teamList}" var="team">
					<tr>
						<td align="center" width="20%">
							<a href="${team.urlBet007}" target="_blank">${team.footballTeamName}</a>
						</td>							
						<td align="center" width="10%" >
							${team.sumJiFen}
						</td>
						
						<td align="center" width="10%" >${team.zcJiFen}</td>
						<td align="center" width="10%" >${team.kcJiFen}</td>
						
						<td align="center" width="10%" >${team.sumJinQiu}</td>
						<td align="center" width="10%" >${team.zcJinQiu}</td>
						<td align="center" width="10%" >${team.kcJinQiu}</td>
					
						<td align="center" width="20%" >
							<a href="javascript:void(0);" onclick="javascript:savePlayer('${team.id}')" >统计球员</a>
							<input type="checkbox" name="teamIds" value="${team.id}" />${team.id}
						</td>
					</tr>
				</c:forEach>
				
				<tr>
					<td colspan="8" align="center">
						<input type="button" name="quanxuan" value="全选 " />
						<input type="button" name="allTeamPla" value="统计球员 " onclick="javascript:saveTeamAllPlayer();" />
					</td>
				</tr>
			</table>
		</form>
	</center>
<a href="" id="dzDataSrc" ></a>
</body>
</html>